﻿/*  
 *  IIS LogFile Analyser, Copyright (C) 2013. http://www.iis-analyser.com
 *  --
 *  This program is free software, provided "AS IS" WITHOUT ANY WARRANTY; without even the implied warranty of 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
 * 
 *  File Author: Ian Quigley,    2013-02-23
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Web
{
    public class AjaxResponse
    {
        public string Status { get; private set; }
        public string Message { get; private set; }
        private AjaxResponse()
        {}

        public static AjaxResponse Ok(string message = "")
        {
            return new AjaxResponse() { Status = "OK", Message = message };
        }

        internal static AjaxResponse DenyAnonymous()
        {
            return new AjaxResponse() { Status = "DENIED", Message = "Anonymous user is denied." };
        }

        internal static AjaxResponse Fail( string message )
        {
            return new AjaxResponse() { Status = "FAIL", Message = message };
        }
    }
}